package com.lwb.ztx.news.presenter;

import com.lwb.ztx.bean.NewsSlideBean;
import com.lwb.ztx.news.model.NewsImageModel;
import com.lwb.ztx.news.model.NewsImageModelImpl;
import com.lwb.ztx.news.view.NewsImageView;

import java.util.List;

/**
 * Created by Administrator on 2016/5/28.
 */
public class NewsImagePresenterImpl implements NewsImagePresenter,NewsImageModelImpl.OnImageLoadFinishListener {
    NewsImageModel newsImageModel;
    NewsImageView newsImageView;

    public NewsImagePresenterImpl(NewsImageView newsImageView) {
        this.newsImageView = newsImageView;
        newsImageModel = new NewsImageModelImpl(this);
    }

    @Override
    public void getSlideImages(String url) {
        newsImageModel.loadImages(url);
    }

    @Override
    public void onSuccess( List<NewsSlideBean> beans) {
        newsImageView.setSlideImages(beans);
    }

    @Override
    public void onFailure() {

    }
}
